{template 'admin','header'}
    <form action="{$self_dir}/investigate.php?action=search" name="form"  onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>调查问卷查询</caption>
        <tr>
            <td  class="align_c">
                调查问卷名称：<input type="text" size="30" name="name" value="{$name}"/>
                <input type="submit" class="button_style" value="查询"/>
            </td>
        </tr>
    </table>
    </form>
    <form action="{$self_dir}/investigate.php?action=listorder" name="form1"  method="POST" onsubmit="return r_submit(this);">
    <table cellpadding="0" cellspacing="1" class="table_list">
        <caption>调查问卷管理</caption>
        <tr>
            <th width="80" class="align_c"><input type="checkbox" onclick="checkall(this,'iid')" id="chkall">全选/取消</th>
            <th width="5%">排序</th>
            <th width="5%">ID</th>
            <th>调查问卷名称</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th width="320">管理操作</th>
        </tr>
        {loop $investigate_list $investigate}
        <tr>
            <td class="align_c">
                <input id="iid" name="iid[]" type="checkbox" id="checkbox"  value="{$investigate['id']}"/>
            </td>
            <td class="align_c">
                <input type="text" name="listorder[{$investigate['id']}]" size="2" value="{$investigate['listorder']}"/>
            </td>
            <td class="align_c">{$investigate['id']}</td>
            <td class="align_c">{$investigate['name']}</td>
            <td class="align_c">{$investigate['startdate']}</td>
            <td class="align_c">{$investigate['enddate']}</td>
            <td class="align_c">
                <a href="{$self_dir}/questions.php?action=add&investigateid={$investigate['id']}&forward={$forward}">添加试题</a>&nbsp;|&nbsp;
                <a href="{$self_dir}/questions.php?action=manage&investigateid={$investigate['id']}&forward={$forward}">问卷试题</a>&nbsp;|&nbsp;
                {if check_perms('investigate003')===true}<a href="{$self_dir}/investigate.php?action=edit&id={$investigate['id']}&forward={$forward}">修改</a>&nbsp;|&nbsp;{/if}
                {if check_perms('investigate004')===true}<a href="javascript:my_request('{format_url("$self_dir/investigate.php?action=del&id=".$investigate['id'])}','确认要删除吗？')">删除</a>{/if}
            </td>
        </tr>
        {/loop}
    </table>
    <div class="button_box">
        {if check_perms('investigate005')===true}<input class="button_style" name="order" type="button" value=" 排序 " onclick="change_opt('form1','{$self_dir}/investigate.php?action=listorder')"/>{/if}
        {if check_perms('investigate002')===true}<input class="button_style" name="add" type="button" value=" 添加调查问卷 " onclick="self.location='{$self_url}?action=add&forward={$forward}'"/>{/if}
        {if check_perms('investigate004')===true}<input class="button_style" name="del" type="button" value=" 批量删除 " onclick="change_opt('form1','{$self_dir}/investigate.php?action=del_all')"/>{/if}
    </div>
    </form>
    <div id="pages">
        {$investigate_pages}
    </div>
{template 'admin','footer'}
